<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>C++ Web Framework: Request Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">C++ Web Framework
   &#160;<span id="projectnumber">3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_request-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Request Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_request.html" title="The Request class holds all information about a http request. ">Request</a> class holds all information about a http request.  
 <a href="class_request.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="request_8h_source.html">request.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5dbe3045d76139502b0c0db5c67ea900"><td class="memItemLeft" align="right" valign="top"><a id="a5dbe3045d76139502b0c0db5c67ea900"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a5dbe3045d76139502b0c0db5c67ea900">Request</a> (QTcpSocket &amp;socket, <a class="el" href="class_q_map_thread_safety.html">QMapThreadSafety</a>&lt; QString, <a class="el" href="class_session.html">Session</a> *&gt; &amp;sessions, const <a class="el" href="class_configuration.html">Configuration</a> &amp;configuration)</td></tr>
<tr class="memdesc:a5dbe3045d76139502b0c0db5c67ea900"><td class="mdescLeft">&#160;</td><td class="mdescRight">This constructor needs to receive a reference to a QTcpSocket and QByteArray. The parameter parent is optional. NOTE: The <a class="el" href="class_cpp_web_server.html" title="The CppWebServer class is a HTTP server, responsable to receive and dispatch the requisitions. ">CppWebServer</a> is responsable to create the QTcpSocket, and the <a class="el" href="class_http_read_request.html" title="The HttpReadRequest class is created automatically by the CppWebServer and inserted   in a QThreadPoo...">HttpReadRequest</a> is responsable to create a <a class="el" href="class_http_read_request.html" title="The HttpReadRequest class is created automatically by the CppWebServer and inserted   in a QThreadPoo...">HttpReadRequest</a> and a <a class="el" href="class_response.html" title="The Response class is responsable to response a Http request. ">Response</a>. <br /></td></tr>
<tr class="separator:a5dbe3045d76139502b0c0db5c67ea900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6936b15e3d926bc4cc208357c4100df"><td class="memItemLeft" align="right" valign="top"><a id="ac6936b15e3d926bc4cc208357c4100df"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#ac6936b15e3d926bc4cc208357c4100df">~Request</a> () noexcept</td></tr>
<tr class="memdesc:ac6936b15e3d926bc4cc208357c4100df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys dynamically allocated resources. <br /></td></tr>
<tr class="separator:ac6936b15e3d926bc4cc208357c4100df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad856d106a54dffed5e478858cdaa7618"><td class="memItemLeft" align="right" valign="top"><a id="ad856d106a54dffed5e478858cdaa7618"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#ad856d106a54dffed5e478858cdaa7618">addAttribute</a> (const std::initializer_list&lt; QPair&lt; QString, QObject *&gt;&gt; &amp;value) noexcept</td></tr>
<tr class="memdesc:ad856d106a54dffed5e478858cdaa7618"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method add attributes that will be passed to a view page. The object can be processed within a page using view CSTL. For this to be possible the object must inherit from QObject and methods and must be in session "public slots". <br /></td></tr>
<tr class="separator:ad856d106a54dffed5e478858cdaa7618"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe81be45f2fffc0e4baf2830278b8c94"><td class="memItemLeft" align="right" valign="top"><a id="afe81be45f2fffc0e4baf2830278b8c94"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#afe81be45f2fffc0e4baf2830278b8c94">addAttribute</a> (const QString &amp;name, QObject *value) noexcept</td></tr>
<tr class="memdesc:afe81be45f2fffc0e4baf2830278b8c94"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method add an attribute that will be passed to a view page. The object can be processed within a page using view CSTL. For this to be possible the object must inherit from QObject and methods and must be in session "public slots". <br /></td></tr>
<tr class="separator:afe81be45f2fffc0e4baf2830278b8c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affe1bd704eaad1077e5577d0f8a22392"><td class="memItemLeft" align="right" valign="top"><a id="affe1bd704eaad1077e5577d0f8a22392"></a>
QMap&lt; QString, QObject * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#affe1bd704eaad1077e5577d0f8a22392">getAttributes</a> () const noexcept</td></tr>
<tr class="memdesc:affe1bd704eaad1077e5577d0f8a22392"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns all the attributes of a <a class="el" href="class_http_read_request.html" title="The HttpReadRequest class is created automatically by the CppWebServer and inserted   in a QThreadPoo...">HttpReadRequest</a>. <br /></td></tr>
<tr class="separator:affe1bd704eaad1077e5577d0f8a22392"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4d1136eebec4011c5512f77dd5e00a2"><td class="memItemLeft" align="right" valign="top"><a id="ab4d1136eebec4011c5512f77dd5e00a2"></a>
const QObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#ab4d1136eebec4011c5512f77dd5e00a2">getAttribute</a> (const QString &amp;name) const noexcept</td></tr>
<tr class="memdesc:ab4d1136eebec4011c5512f77dd5e00a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns a specific object given its name. <br /></td></tr>
<tr class="separator:ab4d1136eebec4011c5512f77dd5e00a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a284909aadbbfd8f76472f8ebaf4ef16e"><td class="memItemLeft" align="right" valign="top"><a id="a284909aadbbfd8f76472f8ebaf4ef16e"></a>
const QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a284909aadbbfd8f76472f8ebaf4ef16e">getBody</a> () const noexcept</td></tr>
<tr class="memdesc:a284909aadbbfd8f76472f8ebaf4ef16e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the request body. <br /></td></tr>
<tr class="separator:a284909aadbbfd8f76472f8ebaf4ef16e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb4c1802fbd8cf14183c231ebb586288"><td class="memItemLeft" align="right" valign="top"><a id="acb4c1802fbd8cf14183c231ebb586288"></a>
QJsonObject&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#acb4c1802fbd8cf14183c231ebb586288">bodyToJsonObject</a> () const noexcept</td></tr>
<tr class="memdesc:acb4c1802fbd8cf14183c231ebb586288"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tries returns the body of the converted request to QJsonObject. <br /></td></tr>
<tr class="separator:acb4c1802fbd8cf14183c231ebb586288"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a933c1581ec12d55a0b307c4060d5e127"><td class="memItemLeft" align="right" valign="top"><a id="a933c1581ec12d55a0b307c4060d5e127"></a>
QJsonArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a933c1581ec12d55a0b307c4060d5e127">bodyToJsonArray</a> () const noexcept</td></tr>
<tr class="memdesc:a933c1581ec12d55a0b307c4060d5e127"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tries returns the body of the converted request to QJsonArray. <br /></td></tr>
<tr class="separator:a933c1581ec12d55a0b307c4060d5e127"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a595822f6e39bf04930f9ad580a5ba34c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_request_dispatcher.html">RequestDispatcher</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a595822f6e39bf04930f9ad580a5ba34c">getRequestDispatcher</a> (const QString &amp;page)</td></tr>
<tr class="memdesc:a595822f6e39bf04930f9ad580a5ba34c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns a requestDispatcher given an specific page.  <a href="#a595822f6e39bf04930f9ad580a5ba34c">More...</a><br /></td></tr>
<tr class="separator:a595822f6e39bf04930f9ad580a5ba34c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a975ffb8f0b6aa08879ffecb50d9bb289"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a975ffb8f0b6aa08879ffecb50d9bb289">getProtocol</a> () const noexcept</td></tr>
<tr class="memdesc:a975ffb8f0b6aa08879ffecb50d9bb289"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the http protocol.  <a href="#a975ffb8f0b6aa08879ffecb50d9bb289">More...</a><br /></td></tr>
<tr class="separator:a975ffb8f0b6aa08879ffecb50d9bb289"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d1eaaa01ab5eb0cf1a1de7a044e9fa3"><td class="memItemLeft" align="right" valign="top"><a id="a5d1eaaa01ab5eb0cf1a1de7a044e9fa3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a5d1eaaa01ab5eb0cf1a1de7a044e9fa3">clearAttributes</a> () noexcept</td></tr>
<tr class="memdesc:a5d1eaaa01ab5eb0cf1a1de7a044e9fa3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method will clear all the attributes. <br /></td></tr>
<tr class="separator:a5d1eaaa01ab5eb0cf1a1de7a044e9fa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a526593ca8b89c6871a36fefb0f2cde1a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a526593ca8b89c6871a36fefb0f2cde1a">setHttpParser</a> (<a class="el" href="class_http_parser.html">HttpParser</a> &amp;httpParser) noexcept</td></tr>
<tr class="memdesc:a526593ca8b89c6871a36fefb0f2cde1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method set the <a class="el" href="class_http_parser.html" title="The class parses a HTTP message. ">HttpParser</a>.  <a href="#a526593ca8b89c6871a36fefb0f2cde1a">More...</a><br /></td></tr>
<tr class="separator:a526593ca8b89c6871a36fefb0f2cde1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeb678695298dab6ae617e87aaa4f312"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_http_parser.html">HttpParser</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#adeb678695298dab6ae617e87aaa4f312">getHttpParser</a> () const noexcept</td></tr>
<tr class="memdesc:adeb678695298dab6ae617e87aaa4f312"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the <a class="el" href="class_http_parser.html" title="The class parses a HTTP message. ">HttpParser</a>.  <a href="#adeb678695298dab6ae617e87aaa4f312">More...</a><br /></td></tr>
<tr class="separator:adeb678695298dab6ae617e87aaa4f312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48d3b2a3579011b0599e721fdb867b27"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a48d3b2a3579011b0599e721fdb867b27">getRequestURL</a> () const noexcept</td></tr>
<tr class="memdesc:a48d3b2a3579011b0599e721fdb867b27"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the requested url.  <a href="#a48d3b2a3579011b0599e721fdb867b27">More...</a><br /></td></tr>
<tr class="separator:a48d3b2a3579011b0599e721fdb867b27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5f623afcbe306d552a495156e3bb9c1"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#aa5f623afcbe306d552a495156e3bb9c1">getRequestURI</a> () const noexcept</td></tr>
<tr class="memdesc:aa5f623afcbe306d552a495156e3bb9c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the requested url.  <a href="#aa5f623afcbe306d552a495156e3bb9c1">More...</a><br /></td></tr>
<tr class="separator:aa5f623afcbe306d552a495156e3bb9c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a004a1262148d077d2de9a9855f5f7ef3"><td class="memItemLeft" align="right" valign="top"><a id="a004a1262148d077d2de9a9855f5f7ef3"></a>
<a class="el" href="class_session.html">Session</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a004a1262148d077d2de9a9855f5f7ef3">getSession</a> ()</td></tr>
<tr class="memdesc:a004a1262148d077d2de9a9855f5f7ef3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the user's session. <br /></td></tr>
<tr class="separator:a004a1262148d077d2de9a9855f5f7ef3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab11b66e85291c653579fbba30bfa1a70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#ab11b66e85291c653579fbba30bfa1a70">setSession</a> (<a class="el" href="class_session.html">Session</a> &amp;session) noexcept</td></tr>
<tr class="memdesc:ab11b66e85291c653579fbba30bfa1a70"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method set the user's session.  <a href="#ab11b66e85291c653579fbba30bfa1a70">More...</a><br /></td></tr>
<tr class="separator:ab11b66e85291c653579fbba30bfa1a70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a78d7b29f1c0d96f101df866c82cef5"><td class="memItemLeft" align="right" valign="top">QByteArray&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a0a78d7b29f1c0d96f101df866c82cef5">getParameter</a> (const QByteArray &amp;name) const noexcept</td></tr>
<tr class="memdesc:a0a78d7b29f1c0d96f101df866c82cef5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the most recent parameter from a request given an specific name.  <a href="#a0a78d7b29f1c0d96f101df866c82cef5">More...</a><br /></td></tr>
<tr class="separator:a0a78d7b29f1c0d96f101df866c82cef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46c49de1519d33ee2ff3cbe5a2874fc9"><td class="memItemLeft" align="right" valign="top">QByteArrayList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a46c49de1519d33ee2ff3cbe5a2874fc9">getParameters</a> (const QByteArray &amp;name) const noexcept</td></tr>
<tr class="memdesc:a46c49de1519d33ee2ff3cbe5a2874fc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the parameters from a request given an specific name.  <a href="#a46c49de1519d33ee2ff3cbe5a2874fc9">More...</a><br /></td></tr>
<tr class="separator:a46c49de1519d33ee2ff3cbe5a2874fc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0469d7af31664f37234397ce2cc46012"><td class="memItemLeft" align="right" valign="top">QTcpSocket &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a0469d7af31664f37234397ce2cc46012">getSocket</a> () const noexcept</td></tr>
<tr class="memdesc:a0469d7af31664f37234397ce2cc46012"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns a reference to the current socket.  <a href="#a0469d7af31664f37234397ce2cc46012">More...</a><br /></td></tr>
<tr class="separator:a0469d7af31664f37234397ce2cc46012"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad87c576630126d44838da46c18a90e01"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#ad87c576630126d44838da46c18a90e01">getPath</a> () const noexcept</td></tr>
<tr class="memdesc:ad87c576630126d44838da46c18a90e01"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns the path.  <a href="#ad87c576630126d44838da46c18a90e01">More...</a><br /></td></tr>
<tr class="separator:ad87c576630126d44838da46c18a90e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61e5ed8f40ac13d028e27fda8695dace"><td class="memItemLeft" align="right" valign="top">QMultiMap&lt; QByteArray, QByteArray &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a61e5ed8f40ac13d028e27fda8695dace">getUploadedFiles</a> () const noexcept</td></tr>
<tr class="memdesc:a61e5ed8f40ac13d028e27fda8695dace"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method returns all the files that the user has sent.  <a href="#a61e5ed8f40ac13d028e27fda8695dace">More...</a><br /></td></tr>
<tr class="separator:a61e5ed8f40ac13d028e27fda8695dace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a934d83fe6fe62aba36a625b6edad8d65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_request.html#a934d83fe6fe62aba36a625b6edad8d65">fillQObject</a> (QObject *object)</td></tr>
<tr class="memdesc:a934d83fe6fe62aba36a625b6edad8d65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a QObject using parameters of a HTTP message.  <a href="#a934d83fe6fe62aba36a625b6edad8d65">More...</a><br /></td></tr>
<tr class="separator:a934d83fe6fe62aba36a625b6edad8d65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad8a1ec4936d077f4d854880ce132227"><td class="memItemLeft" align="right" valign="top"><a id="aad8a1ec4936d077f4d854880ce132227"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>fillQObject</b> (QObject *object, const QMap&lt; QByteArray, QByteArray &gt; &amp;parameters)</td></tr>
<tr class="separator:aad8a1ec4936d077f4d854880ce132227"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a4d54f5003e07e218070a449c22a52c7c"><td class="memItemLeft" align="right" valign="top"><a id="a4d54f5003e07e218070a449c22a52c7c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>HttpReadRequest</b></td></tr>
<tr class="separator:a4d54f5003e07e218070a449c22a52c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae82f2dbbf52e70637edba766141fd80e"><td class="memItemLeft" align="right" valign="top"><a id="ae82f2dbbf52e70637edba766141fd80e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>RequestDispatcher</b></td></tr>
<tr class="separator:ae82f2dbbf52e70637edba766141fd80e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_request.html" title="The Request class holds all information about a http request. ">Request</a> class holds all information about a http request. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a934d83fe6fe62aba36a625b6edad8d65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a934d83fe6fe62aba36a625b6edad8d65">&#9670;&nbsp;</a></span>fillQObject()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Request::fillQObject </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>object</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill a QObject using parameters of a HTTP message. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">QObject</td><td>*object : Object to be filled. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Example</dt><dd><div class="fragment"><div class="line"><span class="comment">//----------------bmi.view----------------</span></div><div class="line"></div><div class="line">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;iso-8859-1&quot;</span> ?&gt;</div><div class="line">&lt;html&gt;</div><div class="line">     &lt;head&gt;</div><div class="line">         &lt;title&gt;Body Mass Index (BMI)&lt;/title&gt;</div><div class="line">     &lt;/head&gt;</div><div class="line">     &lt;body&gt;</div><div class="line">         &lt;form method=<span class="stringliteral">&quot;POST&quot;</span> action=<span class="stringliteral">&quot;/bmi&quot;</span>&gt;</div><div class="line">             Name&lt;br/&gt;&lt;input type=<span class="stringliteral">&quot;text&quot;</span> name=<span class="stringliteral">&quot;name&quot;</span>/&gt;&lt;br/&gt;</div><div class="line">             Mass(KG)&lt;br/&gt;&lt;input type=<span class="stringliteral">&quot;text&quot;</span> name=<span class="stringliteral">&quot;mass&quot;</span>/&gt;&lt;br/&gt;</div><div class="line">             Height(m)&lt;br/&gt;&lt;input type=<span class="stringliteral">&quot;text&quot;</span> name=<span class="stringliteral">&quot;height&quot;</span>/&gt;&lt;br/&gt;&lt;br/&gt;</div><div class="line">             &lt;input type=<span class="stringliteral">&quot;submit&quot;</span> name=<span class="stringliteral">&quot;submit&quot;</span> value=<span class="stringliteral">&quot;Calculate&quot;</span>/&gt;</div><div class="line">         &lt;/form&gt;</div><div class="line">     &lt;/body&gt;</div><div class="line"> &lt;/html&gt;</div><div class="line"></div><div class="line"><span class="comment">//----------------bmiresults.view----------------</span></div><div class="line"></div><div class="line">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;iso-8859-1&quot;</span> ?&gt;</div><div class="line">&lt;html&gt;</div><div class="line">     &lt;head&gt;</div><div class="line">         &lt;title&gt;Body Mass Index (BMI) - Results&lt;/title&gt;</div><div class="line">     &lt;/head&gt;</div><div class="line">     &lt;body&gt;</div><div class="line">         Name: &lt;out value=<span class="stringliteral">&quot;#{user.getName}&quot;</span>/&gt;&lt;br/&gt;</div><div class="line">         Mass(KG): &lt;out value=<span class="stringliteral">&quot;#{user.getMass}&quot;</span>/&gt;&lt;br/&gt;</div><div class="line">         Height(m): &lt;out value=<span class="stringliteral">&quot;#{user.getHeight}&quot;</span>/&gt;&lt;br/&gt;</div><div class="line">         BMI: &lt;out value=<span class="stringliteral">&quot;#{user.getBmi}&quot;</span>/&gt;&lt;br/&gt;</div><div class="line">         Category: &lt;out value=<span class="stringliteral">&quot;#{user.getCategory}&quot;</span>/&gt;</div><div class="line">     &lt;/body&gt;</div><div class="line">&lt;/html&gt;</div><div class="line"></div><div class="line"><span class="comment">//----------------user.h----------------</span></div><div class="line"></div><div class="line">#ifndef USER_H</div><div class="line">#define USER_H</div><div class="line"></div><div class="line">#include &lt;QObject&gt;</div><div class="line">#include &lt;QString&gt;</div><div class="line"></div><div class="line">class User : public QObject</div><div class="line">{</div><div class="line">    Q_OBJECT</div><div class="line"><span class="keyword">private</span>:</div><div class="line">    QString name;</div><div class="line">    QString category;</div><div class="line">    <span class="keywordtype">double</span> mass = 0;</div><div class="line">    <span class="keywordtype">double</span> height = 0;</div><div class="line">    <span class="keywordtype">double</span> bmi = 0;</div><div class="line"><span class="keyword">public</span>:</div><div class="line">    <span class="keyword">explicit</span> User(QObject *parent = 0) : QObject(parent)</div><div class="line">    {</div><div class="line">    }</div><div class="line"><span class="keyword">public</span> slots:</div><div class="line">    QString getName()<span class="keyword"> const</span></div><div class="line"><span class="keyword">    </span>{</div><div class="line">        <span class="keywordflow">return</span> name;</div><div class="line">    }</div><div class="line">    <span class="keywordtype">void</span> setName(<span class="keyword">const</span> QString &amp;value)</div><div class="line">    {</div><div class="line">        name = value;</div><div class="line">    }</div><div class="line">    QString getCategory()<span class="keyword"> const</span></div><div class="line"><span class="keyword">    </span>{</div><div class="line">        <span class="keywordflow">return</span> category;</div><div class="line">    }</div><div class="line">    <span class="keywordtype">double</span> getMass()<span class="keyword"> const</span></div><div class="line"><span class="keyword">    </span>{</div><div class="line">        <span class="keywordflow">return</span> mass;</div><div class="line">    }</div><div class="line">    <span class="keywordtype">void</span> setMass(<span class="keywordtype">double</span> value)</div><div class="line">    {</div><div class="line">        mass = value;</div><div class="line">    }</div><div class="line">    <span class="keywordtype">double</span> getHeight()<span class="keyword"> const</span></div><div class="line"><span class="keyword">    </span>{</div><div class="line">        <span class="keywordflow">return</span> height;</div><div class="line">    }</div><div class="line">    <span class="keywordtype">void</span> setHeight(<span class="keywordtype">double</span> value)</div><div class="line">    {</div><div class="line">        height = value;</div><div class="line">    }</div><div class="line">    <span class="keywordtype">double</span> getBmi()</div><div class="line">    {</div><div class="line">        bmi = height != 0 ? mass / (height * height) : 0;</div><div class="line"></div><div class="line">        <span class="keywordflow">if</span>(bmi &lt;= 15)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Very severely underweight&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bmi &gt; 15 &amp;&amp; bmi &lt;= 16)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Severely underweight&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bmi &gt; 16 &amp;&amp; bmi &lt;= 18.5)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Underweight&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bmi &gt; 18.5 &amp;&amp; bmi &lt;= 25)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Normal (healthy weight)&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bmi &gt; 25 &amp;&amp; bmi &lt;= 30)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Overweight&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bmi &gt; 30 &amp;&amp; bmi &lt;= 35)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Obese Class I (Moderately obese)&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(bmi &gt; 35 &amp;&amp; bmi &lt;= 40)</div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Obese Class II (Severely obese)&quot;</span>;</div><div class="line">        }</div><div class="line">        <span class="keywordflow">else</span></div><div class="line">        {</div><div class="line">            category = <span class="stringliteral">&quot;Obese Class III (Very severely obese)&quot;</span>;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">return</span> bmi;</div><div class="line">    }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="preprocessor">#endif // USER_H</span></div><div class="line"></div><div class="line"><span class="comment">//----------------bmicontroller.h----------------</span></div><div class="line"></div><div class="line"><span class="preprocessor">#ifndef BMICONTROLLER_H</span></div><div class="line"><span class="preprocessor">#define BMICONTROLLER_H</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &quot;cwf/controller.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;cwf/request.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;cwf/response.h&quot;</span></div><div class="line"><span class="preprocessor">#include &quot;entities/user.h&quot;</span></div><div class="line"></div><div class="line"><span class="keyword">class </span>BmiController : <span class="keyword">public</span> CWF::Controller</div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line">    <span class="keywordtype">void</span> doGet(CWF::Request &amp;request, CWF::Response &amp;response)<span class="keyword"> override</span></div><div class="line"><span class="keyword">    </span>{</div><div class="line">        request.getRequestDispatcher(<span class="stringliteral">&quot;/pages/bmi&quot;</span>).forward(request, response);</div><div class="line">    }</div><div class="line">    <span class="keywordtype">void</span> doPost(CWF::Request &amp;request, CWF::Response &amp;response)<span class="keyword"> override</span></div><div class="line"><span class="keyword">    </span>{</div><div class="line">        User user;</div><div class="line">        request.fillQObject(&amp;user);</div><div class="line">        request.addAttribute(<span class="stringliteral">&quot;user&quot;</span>, &amp;user);</div><div class="line">        request.getRequestDispatcher(<span class="stringliteral">&quot;/pages/bmiresults.view&quot;</span>).forward(request, response);</div><div class="line">    }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="preprocessor">#endif // BMICONTROLLER_H</span></div><div class="line"></div><div class="line"><span class="comment">//----------------main.cpp----------------</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;QCoreApplication&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;cwf/cppwebapplication.h&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;controllers/bmicontroller.h&gt;</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])</div><div class="line">{</div><div class="line">    CWF::CppWebApplication server(argc, argv, <span class="stringliteral">&quot;PATH_TO_SERVER_FOLDER&quot;</span>);</div><div class="line"></div><div class="line">    server.addUrlController&lt;BmiController&gt;(<span class="stringliteral">&quot;/bmi&quot;</span>);</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> server.start();</div><div class="line">}</div></div><!-- fragment --> </dd></dl>

</div>
</div>
<a id="adeb678695298dab6ae617e87aaa4f312"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adeb678695298dab6ae617e87aaa4f312">&#9670;&nbsp;</a></span>getHttpParser()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_http_parser.html">HttpParser</a>&amp; Request::getHttpParser </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the <a class="el" href="class_http_parser.html" title="The class parses a HTTP message. ">HttpParser</a>. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_http_parser.html" title="The class parses a HTTP message. ">HttpParser</a> </dd></dl>

</div>
</div>
<a id="a0a78d7b29f1c0d96f101df866c82cef5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a78d7b29f1c0d96f101df866c82cef5">&#9670;&nbsp;</a></span>getParameter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray Request::getParameter </td>
          <td>(</td>
          <td class="paramtype">const QByteArray &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the most recent parameter from a request given an specific name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>: This is a reference to a QByteArray. </td></tr>
    <tr><td class="paramname">decode</td><td>: If true, decode the parameter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>QByteArray </dd></dl>

</div>
</div>
<a id="a46c49de1519d33ee2ff3cbe5a2874fc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46c49de1519d33ee2ff3cbe5a2874fc9">&#9670;&nbsp;</a></span>getParameters()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QByteArrayList Request::getParameters </td>
          <td>(</td>
          <td class="paramtype">const QByteArray &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the parameters from a request given an specific name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>: This is a reference to a QByteArray. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>QByteArray </dd></dl>

</div>
</div>
<a id="ad87c576630126d44838da46c18a90e01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad87c576630126d44838da46c18a90e01">&#9670;&nbsp;</a></span>getPath()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString Request::getPath </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the path. </p>
<dl class="section return"><dt>Returns</dt><dd>QString </dd></dl>

</div>
</div>
<a id="a975ffb8f0b6aa08879ffecb50d9bb289"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a975ffb8f0b6aa08879ffecb50d9bb289">&#9670;&nbsp;</a></span>getProtocol()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray Request::getProtocol </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the http protocol. </p>
<dl class="section return"><dt>Returns</dt><dd>QByteArray </dd></dl>

</div>
</div>
<a id="a595822f6e39bf04930f9ad580a5ba34c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a595822f6e39bf04930f9ad580a5ba34c">&#9670;&nbsp;</a></span>getRequestDispatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_request_dispatcher.html">RequestDispatcher</a> &amp; Request::getRequestDispatcher </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>page</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This method returns a requestDispatcher given an specific page. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">page</td><td>: This is a reference to a QByteArray. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_request_dispatcher.html" title="The RequestDispatcher class can be used to dispatch a requisition to a page. ">RequestDispatcher</a> </dd></dl>

</div>
</div>
<a id="aa5f623afcbe306d552a495156e3bb9c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5f623afcbe306d552a495156e3bb9c1">&#9670;&nbsp;</a></span>getRequestURI()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray Request::getRequestURI </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the requested url. </p>
<dl class="section return"><dt>Returns</dt><dd>QByteArray </dd></dl>

</div>
</div>
<a id="a48d3b2a3579011b0599e721fdb867b27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48d3b2a3579011b0599e721fdb867b27">&#9670;&nbsp;</a></span>getRequestURL()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QByteArray Request::getRequestURL </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns the requested url. </p>
<dl class="section return"><dt>Returns</dt><dd>QByteArray </dd></dl>

</div>
</div>
<a id="a0469d7af31664f37234397ce2cc46012"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0469d7af31664f37234397ce2cc46012">&#9670;&nbsp;</a></span>getSocket()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QTcpSocket&amp; Request::getSocket </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns a reference to the current socket. </p>
<dl class="section return"><dt>Returns</dt><dd>QTcpSocket </dd></dl>

</div>
</div>
<a id="a61e5ed8f40ac13d028e27fda8695dace"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61e5ed8f40ac13d028e27fda8695dace">&#9670;&nbsp;</a></span>getUploadedFiles()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QMultiMap&lt;QByteArray, QByteArray&gt; Request::getUploadedFiles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method returns all the files that the user has sent. </p>
<dl class="section return"><dt>Returns</dt><dd>QMap&lt;QByteArray, QByteArray&gt; </dd></dl>

</div>
</div>
<a id="a526593ca8b89c6871a36fefb0f2cde1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a526593ca8b89c6871a36fefb0f2cde1a">&#9670;&nbsp;</a></span>setHttpParser()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Request::setHttpParser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_http_parser.html">HttpParser</a> &amp;&#160;</td>
          <td class="paramname"><em>httpParser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method set the <a class="el" href="class_http_parser.html" title="The class parses a HTTP message. ">HttpParser</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">httpParser</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab11b66e85291c653579fbba30bfa1a70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab11b66e85291c653579fbba30bfa1a70">&#9670;&nbsp;</a></span>setSession()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void Request::setSession </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_session.html">Session</a> &amp;&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method set the user's session. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_session.html" title="The Session class holds information about a client session. ">Session</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/herik/CPPWebFramework/CPPWebFramework/cwf/<a class="el" href="request_8h_source.html">request.h</a></li>
<li>/home/herik/CPPWebFramework/CPPWebFramework/cwf/request.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon May 28 2018 11:09:09 for C++ Web Framework by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
